<?php


namespace app\admin\controller;
use app\admin\model\GoodsType as GoodsTypeModel;
use think\Request;
use think\Paginator;    //分页

class GoodsType extends Base
{
    //商品分类表
    public function lists()
    {
        //查询
        $type = GoodsTypeModel::paginate(4);
        $typePage = $type->render();

        //传值,渲染页面
        $webSite = WEB_SITE;
        $staticAdmin = STATIC_ADMIN;

        $this->assign([
            'webSite'     => $webSite,
            'staticAdmin' => $staticAdmin,
            'type'       => $type,
            'typePage'   => $typePage,
        ]);
        return $this->fetch();
    }


}